<template>
  <div class="app-container">
    <el-form ref="form" :model="data" label-width="80px">
      <el-form-item label="id">
        <div>{{data.id}}</div>
      </el-form-item>
      <el-form-item label="商家编号">
        <div>{{data.customerCode}}</div>
      </el-form-item>
      <el-form-item label="商家名称">
        <div>{{data.customerName}}</div>
      </el-form-item>
      <el-form-item label="联系人">
        <div>{{data.contactName}}</div>
      </el-form-item>
      <el-form-item label="联系电话">
        <div>{{data.contactName}}</div>
      </el-form-item>
      <el-form-item label="商家说明">
        <div>{{data.customerDesc}}</div>
      </el-form-item>
      <el-form-item label="商家状态">
        <div>{{data.status|statusName()}}</div>
      </el-form-item>
      <el-form-item label="创建时间">
        <div>{{data.createTime}}</div>
      </el-form-item>
      <el-form-item label="更新时间">
        <div>{{data.updateTime}}</div>
      </el-form-item>

    </el-form>
  </div>
</template>

<script>
import {storagedetail} from "../../api/article";
import {customerDetail} from "../../api/customer";

export default {
  name: "detail",
  data(){
    return{
      data:{}
    }
  },
  filters: {
    statusName(status) {
      if (status===1) {
        return '正常';
      }else{
        return '异常'
      }
    }
  },
  created() {
    this.getDetail(this.$route.query.id)
  },
  methods:{
    getDetail(id){
      customerDetail({id:id}).then(response => {
        this.data = response.data.data
      })
    }
  }
}
</script>

<style scoped>

</style>
